//
//  XrLunBoCollectionViewCell.m
//  TasteEnjoy
//
//  Created by XuRui on 16/4/23.
//  Copyright © 2016年 XuRui. All rights reserved.
//

#import "XrLunBoCollectionViewCell.h"

@implementation XrLunBoCollectionViewCell

- (void)dealloc
{
    [_photo release];
    [super dealloc];
}


#pragma mark - ------------ 初始化 设置img ---------------
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.photo = [[BaseImageView alloc]init];
        _photo.contentMode =  UIViewContentModeScaleAspectFill;
        _photo.clipsToBounds = YES;
        [self.contentView addSubview:_photo];
        
    }
    return self;
    
}
#pragma mark - ------------ 设置img大小 ---------------
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    _photo.frame = self.contentView.frame;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
